#ifndef APPCONFIG_H
#define APPCONFIG_H

#include <QMap>
#include <QString>
#include <QObject>

class QSettings;
class QFileSystemWatcher;
class AppConfig : public QObject
{
	Q_OBJECT

public:
	AppConfig(QObject *parent);
	~AppConfig();

public:
	static AppConfig & getInstance();
	void loadConfig(const QString & config);

protected slots:
	void onConfigFileChanged(const QString & path);

private:
	void parseConfig(const QString & config);
	void parseModuleConfig(QSettings * settings);
	void parseForbiddenPatters(const QString & fileName);

private:
	static AppConfig * pAppConfig;
	QFileSystemWatcher * pFileWatcher;
};

#endif // APPCONFIG_H
